package imagekeeper.data;

import java.sql.Connection;
import java.sql.Statement;
import java.sql.SQLException;
import javax.sql.DataSource;


abstract class AbstractEntityManager {
    protected DataSource dataSource;
    
    protected void closeConnection(Connection c) {
        try {
            c.close();
        }
        catch (SQLException ex) { }
    }
    
    protected void closeStatement(Statement st) {
        try {
            st.close();
        }
        catch (SQLException ex) { }
    }
    
    protected void rollbackTransaction(Connection c) {
        try {
            c.rollback();
        }
        catch (SQLException ex) { }
    }
}
